var readline = require('readline-sync')
readline.setDefaultOptions({ prompt: '' })
var readline = readline.prompt
let [str, reg] = readline().split(' ')
let replaceStr = ''
for (let i = 0; i < reg.length; i++) {
  replaceStr += '*'
}
let regx = new RegExp(reg, 'g')
str = str.replace(regx, replaceStr)
console.log(str)